package com.lecloud.model;

import java.util.HashMap;
import java.util.Map;

/**
 * 公共参数，共4个
 * 
 * @author zhagz
 * 
 */
public class PublicParam {

	// public String method = null;
	// public String ver = null;
	// public int userid = -1;
	// public long timestamp = -1;

	private PublicParam() {
	}

	/**
	 * 直接使用此方法初始化存有公共参数的map</br>
	 * 若未做特殊说明，本文档所有接口均需传以下五个参数：method.ver.userid.timestamp.sign
	 * 
	 * @param method
	 * @param ver
	 * @param userid
	 * @param timestamp
	 * @return
	 */
	public static Map<String, String> getPublicParamMap(String method, String ver, int userid, long timestamp) {
		Map<String, String> map = new HashMap<String, String>();
		map.put("method", method);
		map.put("ver", ver);
		map.put("userid", userid + "");
		map.put("timestamp", timestamp + "");

		return map;
	}

}